home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / TCCLIB.ZIP / RESTORE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-07-18  |  399 b   |  15 lines

  1. #include <conio.h>
  2.  
  3. #define VIDMODE   *(unsigned char far *) 0x00449lu
  4. #define MONOSEG  0xb0000000L
  5. #define COLOR 0xb8000000L
  6. #define VIDSEG (unsigned char far *)((7 == VIDMODE) ? MONOSEG : COLOR )
  7.  
  8. void RestoreCurPos( unsigned char far *scptr )
  9. {
  10.     unsigned long p = (unsigned long) scptr - (unsigned long) VIDSEG;
  11.     p /= 2;
  12.     p += 81;
  13.     gotoxy( (unsigned) p % 80, (unsigned) p / 80 );
  14. }
  15.